package com.easygem.controller.front;

import com.easygem.common.error.SystemException;
import com.easygem.common.response.ResponseBean;
import com.easygem.common.vo.front.DepartmentStatsVo;
import com.easygem.front.service.DepartmentStatsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author luoxi
 * @version 1.0
 * @className DepartmentStatsController
 * @Description 统计中心控制层
 * @date 2024/12/23 20:21
 */
@Api(tags = "统计中心")
@RestController
@RequestMapping("/system/departmentStats")
public class DepartmentStatsController {
    @Autowired
    private DepartmentStatsService departmentStatsService;

    @ApiOperation(value = "编辑系统通知")
    @RequiresPermissions({"departmentStats:edit"})
    @GetMapping("/edit")
    @ResponseBody
    public ResponseBean edit() throws SystemException {
        System.out.println("统计中心控制层");
        DepartmentStatsVo departmentStatsVo = departmentStatsService.edit();
        return ResponseBean.success(departmentStatsVo);
    }
}
